home *** CD-ROM | disk | FTP | other *** search
- rem [
- rem Name: u.delfiles.bat
- rem
- rem Derived from: (original)
- rem
- rem Author: Clive Standbridge
- rem
- rem Created on: Dec 1996
- rem
- rem Sccs ID: @(#)u.delfiles.bat 1.13 10/13/97
- rem
- rem Coding Stds:
- rem
- rem Purpose: Hard disk upgrader - delete files.
- rem
- rem Parameters: 1 Action required. MUST be one of:
- rem "list" Delete and/or move files in internal
- rem list. The batch file processes a list
- rem of files, calling itself recursively
- rem to delete or move files as appropriate.
- rem "del" ONLY TO BE USED RECURSIVELY.
- rem Delete file(s) in parameter 2.
- rem Typically this would be used to remove
- rem obsolete Insignia-supplied files, where
- rem we are confident that they are obsolete.
- rem "move" ONLY TO BE USED RECURSIVELY.
- rem Move file(s) in parameter 2 to directory
- rem for obsolete files.
- rem If an obsolete copy already exists, the
- rem file is simply deleted.
- rem "copy" ONLY TO BE USED RECURSIVELY.
- rem Copy file(s) in parameter 2 to directory
- rem for obsolete files.
- rem If an obsolete copy already exists, the
- rem file is not copied.
- rem Typically "move" and "copy" would be used to
- rem back up obsolete MS or third-party files, where
- rem we wish to exercise some caution in removing
- rem things completely from the user's disk.
- rem Parameters for del action:
- rem 2 Full path of file(s) to be deleted/moved.
- rem Parameters for move and copy actions:
- rem 2 Path to file to be deleted/moved/copied.
- rem 3 Name of file to be deleted/moved/copied.
- rem Parameters for list action:
- rem 2 FSA directory for split Windows setup.
- rem = c:\windows for hard disk only setup.
- rem 3 Windows system directory.
- rem = c:\windows\system for hard disk only setup.
- rem 4 Intel OS; must be one of:
- rem "dos", "win311", "wfw311", "win95", "win98".
- rem 5 Host OS ("mac", "unix", etc.)
- rem 6 New Intel OS flag; value 0(false) or 1(true)
- rem
- rem Copyright 1997 Insignia Solutions PLC. All rights reserved.
- rem ]
-
- goto %1
- rem goto end
-
- :del
- if not exist %2 goto end
- echo deleting %2 >>c:\insignia\up.log
- del %2 >>c:\insignia\up.log
- goto end
-
- :move
- :copy
- if not exist c:\insignia\obsolete\nul mkdir c:\insignia\obsolete >>c:\insignia\up.log
- rem Move/Copy the file to obsolete directory, unless a copy is already there.
- if not exist %2\%3 goto end
- if exist c:\insignia\obsolete\%3 goto end
- echo %1 %2\%3 to c:\insignia\obsolete >>c:\insignia\up.log
- %1 /y %2\%3 c:\insignia\obsolete >>c:\insignia\up.log
- goto end
-
- :list
- rem Process list of files for removal.
-
- rem Obsolete networking setup files
- call %0 del c:\insignia\netisnds.inf
- call %0 del c:\insignia\netisodi.inf
- call %0 del c:\windows\inf\netisnds.inf
- call %0 del c:\windows\inf\netisodi.inf
-
- rem Potentially obsolete utilities may cause trouble;
- rem the upgrader will create new ones when ready.
- call %0 del c:\insignia\inspat95.exe
- call %0 del c:\insignia\insreged.exe
-
- rem Obsolete log files
- call %0 del c:\insignia.out
- call %0 del c:\insignia\out
- call %0 del c:\insignia\patch.out
-
- rem Mis-named batch file
- call %0 del c:\insignia\use_cd.bat
-
- rem Obsolete drivers - may cause problems
- call %0 del c:\insignia\spcmswd.drv
- call %0 del c:\insignia\swinsnd.drv
- call %0 del %3\spcmswd.drv
- call %0 del %3\swinsnd.drv
-
- rem Obsolete original binaries.
- rem After Intel OS upgrade these are useless and potential trouble.
- if "%6" == "0" goto no_OS_change
- deltree /y %3\original.sav >>c:\insignia\up.log
- deltree /y %3\vmm32\original.sav >>c:\insignia\up.log
- :no_OS_change
-
- rem Obsolete 16-bit stuff and old shortcuts.
- itest strnicmp "%4" win9 4
- if errorlevel 1 goto not_win95
- call %0 del c:\insignia\smrtcpy.exe
- call %0 del c:\insignia\smrtcp32.exe
- call %0 del c:\insignia\winidle.exe
- call %0 del c:\insignia\wnidle32.exe
- call %0 del %2\smrtcpy.exe
- call %0 del %2\smrtcp32.exe
- call %0 del %2\winidle.exe
- call %0 del %2\wnidle32.exe
- call %0 del c:\insignia\suspend.com
- call %0 del c:\insignia\suspend.pif
- call %0 del c:\windows\suspend.com
- call %0 del c:\windows\pif\suspend.pif
-
- call %0 del %3\vidled.386
- rem Possibly non-Insignia Winsock files
- call %0 copy %2 winsock.dll
- call %0 copy %3 wsock32.dll
- rem winsock.dll in the SYSTEM directory must result from
- rem installing Windows 95 over Windows 3.1 - just delete it.
- call %0 del %3\winsock.dll
- goto all_win
-
- :not_win95
- rem Possibly non-Insignia Winsock files
- call %0 copy %3 winsock.dll
- call %0 copy %3 wsock32.dll
- goto all_win
-
- :all_win
-
- goto end
-
- :end